public class MatrixGenerator
{
    private final int column;
    private final int row;
    private double[][] matrix;

    public MatrixGenerator()
    {
        column = 0;
        row = 0;
        matrix = new double[0][0];
    }

    public MatrixGenerator(int row, int column)
    {
        this.column = Math.max(0, column);
        this.row = Math.max(0, row);
        this.matrix = new double[row][column];
    }

    private void generateMatrix()
    {
        for (int i = 0; i < row; i++)
        {
            for (int j = 0; j < column; j++)
            {
                matrix[i][j] = Math.random() * 10;
            }
        }
    }

    public double[][] getMatrix()
    {
        generateMatrix();
        return matrix;
    }
}
